<template>
  <div>
    <!-- 顶部导航 -->
    <Headnav></Headnav>
    <!-- 搜索导航 -->
    <SearchBar></SearchBar>
    <!-- 路由 -->
    <router-view></router-view>

    <div class="footer">
      <!-- 底部导航 -->
      <foooter></foooter>
    </div>

  </div>
</template>

<script>
import { ArrowRightBold } from "@element-plus/icons";
import Headnav from "@/components/headnav";
import SearchBar from "@/components/SearchBar/index.vue";

import foooter from "@/components/footer";
export default {
  components: {
    ArrowRightBold,
    Headnav,
    SearchBar,
    foooter,
  },
  data() {
    return {
      widths: window.outerWidth,
      maxwidths: window.outerWidth,
      isRghtShow: true,
    };
    // 菜单数据 
  },
  created() {
    console.log(window.localStorage.getItem("userInfo"))
    window.onresize = () => {
      return (() => {
        this.widths = window.outerWidth;
        if (this.widths < this.maxwidths * 0.9) {
          this.isRghtShow = false;
        } else {
          this.isRghtShow = true;
        }
      })();
    };
  },
};
</script>

<style scoped>
.footer {
  width: 1280px;
  margin: 0 auto;
}
</style>